/*
 * @title: 按需配置加载element-ui组件
 * @author: andy.ten@tom.com & xukaixing@hotmail.com
 * @Date: 2022-04-14 07:37:51
 * @LastEditors: andy.ten@tom.com
 * @LastEditTime: 2022-06-06 12:34:08
 * @version: 1.0.3
 * @copyright: copyright (c) 2022 andyten
 *  node: you can not copy and/or use and/or modify this program free,
 *  please reserve the segment above.Please mail me if you have any question.
 */
import Vue from 'vue';
import {
  Loading,
  Button,
  Form,
  FormItem,
  Input,
  DatePicker,
  Autocomplete,
  Container,
  Header,
  Aside,
  Main,
  Menu,
  Submenu,
  MenuItem,
  Breadcrumb,
  BreadcrumbItem,
  Scrollbar,
  Dropdown,
  DropdownMenu,
  DropdownItem,
  Divider,
  // Card,
  Row,
  Col,
  Table,
  TableColumn,
  Popover,
  Switch,
  Tooltip,
  Pagination,
  Dialog,
  Drawer,
  // Message,
  // MessageBox,
  // Notification,
  Tag,
  Tree,
  Select,
  Option,
  // Cascader,
  Alert,
  Tabs,
  TabPane,
  Steps,
  Step,
  CheckboxGroup,
  Checkbox,
  RadioGroup,
  Radio,
  Timeline,
  TimelineItem,
  Badge,
  Popconfirm,
  Upload,
  Progress
} from 'element-ui';

// Vue.prototype.$ELEMENT = { size: 'small', zIndex: 3000 };

const element = {
  install(Vue) {
    Vue.use(Button);
    Vue.use(Form);
    Vue.use(FormItem);
    Vue.use(Input);
    Vue.use(DatePicker);
    Vue.use(Autocomplete);
    Vue.use(Container);
    Vue.use(Header);
    Vue.use(Aside);
    Vue.use(Main);
    Vue.use(Menu);
    Vue.use(Submenu);
    Vue.use(MenuItem);
    Vue.use(Breadcrumb);
    Vue.use(BreadcrumbItem);
    Vue.use(Scrollbar);
    Vue.use(Dropdown);
    Vue.use(DropdownMenu);
    Vue.use(DropdownItem);
    Vue.use(Divider);
    // Vue.use(Card);
    Vue.use(Row);
    Vue.use(Col);
    Vue.use(Table);
    Vue.use(TableColumn);
    Vue.use(Popover);
    Vue.use(Switch);
    Vue.use(Tooltip);
    Vue.use(Pagination);
    Vue.use(Dialog);
    Vue.use(Drawer);
    Vue.use(Tag);
    Vue.use(Tree);
    Vue.use(Select);
    Vue.use(Option);
    // Vue.use(Cascader);
    Vue.use(Alert);
    Vue.use(Tabs);
    Vue.use(TabPane);
    Vue.use(Steps);
    Vue.use(Step);
    Vue.use(CheckboxGroup);
    Vue.use(Checkbox);
    Vue.use(RadioGroup);
    Vue.use(Radio);
    Vue.use(Timeline);
    Vue.use(TimelineItem);
    Vue.use(Badge);
    Vue.use(Popconfirm);
    Vue.use(Upload);
    Vue.use(Progress);
  }
};

// 特殊的是message, 需要全局挂载 弹窗
Vue.use(Loading.directive);
Vue.prototype.$loading = Loading.service;
// Vue.prototype.$msgbox = MessageBox;
// Vue.prototype.$message = Message;
// Vue.prototype.$notify = Notification;
export default element;
